<template>
  <div class="">
    <h2>当前求和为：{{ sum }}</h2>
    <button @click="add">点我sum+1</button>
    <hr>
    <img v-for="(dog, index) in dogList" :src="dog" :key="index">
    <hr>
    <button @click="getDog">再来一只小狗</button>
  </div>
</template>

<script lang="ts" setup>
import useDog from '@/hooks/useDog';
import useSum from '@/hooks/useSum';

const { sum, add } = useSum()
const { dogList, getDog } = useDog()

</script>



<style lang="scss" scoped>
.person {
  background-color: skyblue;
  box-shadow: 0 0 10px;
  border-radius: 10px;
  color: white;
  padding: 20px;
}

img {
  height: 100px;
}

button {
  margin: 0 5px;
}
</style>
